﻿#include "hsPlayer/hsplayer.h"
#include "config/config.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    av_register_all();///注册所有组件
    avformat_network_init();///初始化网络组件
//    av_log_set_level(AV_LOG_DEBUG);
    if(SDL_Init(SDL_INIT_VIDEO)){
        PRTLOG()<<"[SDL2]:SDL_Init fail";
        return false;
    }
    HSPlayer *w = new HSPlayer();
    w->HSPlayer_Set_ChannelText("1");
    w->HSPlayer_Move(0,0);
    w->HSPlayer_Resize(640,480);

    w->HSPlayer_Local_LoadFile(QString("/home/gy/Test.mp4"));
    w->HSPlayer_Start();
    return a.exec();
}
